package com.example.template.commontable.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.example.template.commontable.mapper.CommonTableMapper;
import com.example.template.core.annotation.MapperClass;
import com.example.template.core.entity.BaseEntity;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.*;

/**
 * 
 * 通用表格
 * @author meko
 * @date 2019-11-28
 */
@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
@ApiModel("通用表格")
@MapperClass(CommonTableMapper.class)
@Table(name = "`common_table`")
public class CommonTable extends BaseEntity {
    /**
     * TABLE_NAME
     */
    @Id
    @Column(name = "`TABLE_NAME`")
    @ApiModelProperty("TABLE_NAME")
    @Excel(name = "TABLE_NAME")
    private String tableName;

    /**
     * TABLE_CATALOG
     */
    @Column(name = "`TABLE_CATALOG`")
    @ApiModelProperty("TABLE_CATALOG")
    @Excel(name = "TABLE_CATALOG")
    private String tableCatalog;

    /**
     * TABLE_SCHEMA
     */
    @Column(name = "`TABLE_SCHEMA`")
    @ApiModelProperty("TABLE_SCHEMA")
    @Excel(name = "TABLE_SCHEMA")
    private String tableSchema;

    /**
     * TABLE_TYPE
     */
    @Column(name = "`TABLE_TYPE`")
    @ApiModelProperty("TABLE_TYPE")
    @Excel(name = "TABLE_TYPE")
    private String tableType;

    /**
     * ENGINE
     */
    @Column(name = "`ENGINE`")
    @ApiModelProperty("ENGINE")
    @Excel(name = "ENGINE")
    private String engine;

    /**
     * VERSION
     */
    @Column(name = "`VERSION`")
    @ApiModelProperty("VERSION")
    @Excel(name = "VERSION")
    private String version;

    /**
     * ROW_FORMAT
     */
    @Column(name = "`ROW_FORMAT`")
    @ApiModelProperty("ROW_FORMAT")
    @Excel(name = "ROW_FORMAT")
    private String rowFormat;

    /**
     * TABLE_ROWS
     */
    @Column(name = "`TABLE_ROWS`")
    @ApiModelProperty("TABLE_ROWS")
    @Excel(name = "TABLE_ROWS")
    private String tableRows;

    /**
     * AVG_ROW_LENGTH
     */
    @Column(name = "`AVG_ROW_LENGTH`")
    @ApiModelProperty("AVG_ROW_LENGTH")
    @Excel(name = "AVG_ROW_LENGTH")
    private String avgRowLength;

    /**
     * DATA_LENGTH
     */
    @Column(name = "`DATA_LENGTH`")
    @ApiModelProperty("DATA_LENGTH")
    @Excel(name = "DATA_LENGTH")
    private String dataLength;

    /**
     * MAX_DATA_LENGTH
     */
    @Column(name = "`MAX_DATA_LENGTH`")
    @ApiModelProperty("MAX_DATA_LENGTH")
    @Excel(name = "MAX_DATA_LENGTH")
    private String maxDataLength;

    /**
     * INDEX_LENGTH
     */
    @Column(name = "`INDEX_LENGTH`")
    @ApiModelProperty("INDEX_LENGTH")
    @Excel(name = "INDEX_LENGTH")
    private String indexLength;

    /**
     * DATA_FREE
     */
    @Column(name = "`DATA_FREE`")
    @ApiModelProperty("DATA_FREE")
    @Excel(name = "DATA_FREE")
    private String dataFree;

    /**
     * AUTO_INCREMENT
     */
    @Column(name = "`AUTO_INCREMENT`")
    @ApiModelProperty("AUTO_INCREMENT")
    @Excel(name = "AUTO_INCREMENT")
    private String autoIncrement;

    /**
     * CREATE_TIME
     */
    @Column(name = "`CREATE_TIME`")
    @ApiModelProperty("CREATE_TIME")
    @Excel(name = "CREATE_TIME")
    private String createTime;

    /**
     * UPDATE_TIME
     */
    @Column(name = "`UPDATE_TIME`")
    @ApiModelProperty("UPDATE_TIME")
    @Excel(name = "UPDATE_TIME")
    private String updateTime;

    /**
     * CHECK_TIME
     */
    @Column(name = "`CHECK_TIME`")
    @ApiModelProperty("CHECK_TIME")
    @Excel(name = "CHECK_TIME")
    private String checkTime;

    /**
     * TABLE_COLLATION
     */
    @Column(name = "`TABLE_COLLATION`")
    @ApiModelProperty("TABLE_COLLATION")
    @Excel(name = "TABLE_COLLATION")
    private String tableCollation;

    /**
     * CHECKSUM
     */
    @Column(name = "`CHECKSUM`")
    @ApiModelProperty("CHECKSUM")
    @Excel(name = "CHECKSUM")
    private String checksum;

    /**
     * CREATE_OPTIONS
     */
    @Column(name = "`CREATE_OPTIONS`")
    @ApiModelProperty("CREATE_OPTIONS")
    @Excel(name = "CREATE_OPTIONS")
    private String createOptions;

    /**
     * TABLE_COMMENT
     */
    @Column(name = "`TABLE_COMMENT`")
    @ApiModelProperty("TABLE_COMMENT")
    @Excel(name = "TABLE_COMMENT")
    private String tableComment;

    public static final String TABLE_NAME = "tableName";

    public static final String DB_TABLE_NAME = "TABLE_NAME";

    public static final String TABLE_CATALOG = "tableCatalog";

    public static final String DB_TABLE_CATALOG = "TABLE_CATALOG";

    public static final String TABLE_SCHEMA = "tableSchema";

    public static final String DB_TABLE_SCHEMA = "TABLE_SCHEMA";

    public static final String TABLE_TYPE = "tableType";

    public static final String DB_TABLE_TYPE = "TABLE_TYPE";

    public static final String ENGINE = "engine";

    public static final String DB_ENGINE = "ENGINE";

    public static final String VERSION = "version";

    public static final String DB_VERSION = "VERSION";

    public static final String ROW_FORMAT = "rowFormat";

    public static final String DB_ROW_FORMAT = "ROW_FORMAT";

    public static final String TABLE_ROWS = "tableRows";

    public static final String DB_TABLE_ROWS = "TABLE_ROWS";

    public static final String AVG_ROW_LENGTH = "avgRowLength";

    public static final String DB_AVG_ROW_LENGTH = "AVG_ROW_LENGTH";

    public static final String DATA_LENGTH = "dataLength";

    public static final String DB_DATA_LENGTH = "DATA_LENGTH";

    public static final String MAX_DATA_LENGTH = "maxDataLength";

    public static final String DB_MAX_DATA_LENGTH = "MAX_DATA_LENGTH";

    public static final String INDEX_LENGTH = "indexLength";

    public static final String DB_INDEX_LENGTH = "INDEX_LENGTH";

    public static final String DATA_FREE = "dataFree";

    public static final String DB_DATA_FREE = "DATA_FREE";

    public static final String AUTO_INCREMENT = "autoIncrement";

    public static final String DB_AUTO_INCREMENT = "AUTO_INCREMENT";

    public static final String CREATE_TIME = "createTime";

    public static final String DB_CREATE_TIME = "CREATE_TIME";

    public static final String UPDATE_TIME = "updateTime";

    public static final String DB_UPDATE_TIME = "UPDATE_TIME";

    public static final String CHECK_TIME = "checkTime";

    public static final String DB_CHECK_TIME = "CHECK_TIME";

    public static final String TABLE_COLLATION = "tableCollation";

    public static final String DB_TABLE_COLLATION = "TABLE_COLLATION";

    public static final String CHECKSUM = "checksum";

    public static final String DB_CHECKSUM = "CHECKSUM";

    public static final String CREATE_OPTIONS = "createOptions";

    public static final String DB_CREATE_OPTIONS = "CREATE_OPTIONS";

    public static final String TABLE_COMMENT = "tableComment";

    public static final String DB_TABLE_COMMENT = "TABLE_COMMENT";

    public static CommonTable defaultInstance() {
        CommonTable instance = new CommonTable();
        instance.tableName = new String("");
        return instance;
    }
}